package de.lulusoft.anothertorrent.gui.views.Providers;

import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.Viewer;

import de.lulusoft.anothertorrent.core.rtorrent.TorrentCommands;

public class TorrentCommandsViewContentProvider implements
		IStructuredContentProvider {

	@Override
	public Object[] getElements(Object inputElement) {
		if (inputElement instanceof TorrentCommands)
		{
			TorrentCommands tcs = (TorrentCommands)inputElement;
			return tcs.getCommands().toArray();
		}
		return new Object[0];
	}

	@Override
	public void dispose() {
	}

	@Override
	public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
	}

}
